﻿//  --------------------------------
//  Copyright (c) 2010 Michael Schuler, Sascha Burger. All rights reserved.
//  This source code is made available under the terms of the Microsoft Public License (Ms-PL)
//  http://p2pmessaging.codeplex.com/license
//  ---------------------------------
namespace p2pMessaging.Interfaces.Contact
{
	/// <summary>
	/// Basic service to store and load contacts to/from the persistency layer.
	/// </summary>
	public interface IContactService
	{
		/// <summary>
		/// Store a contact to the persistency layer.
		/// </summary>
		/// <param name="contact">Contact</param>
		void Store(IContact contact);
		
		/// <summary>
		/// Remove a contact from the persistency layer.
		/// </summary>
		/// <param name="contact">Contact</param>
		void Delete(IContact contact);
		
		/// <summary>
		/// Return a specific contact from the persistency layer.
		/// </summary>
		/// <param name="id">Identity of the specific contact.</param>
		/// <returns>The contact if found otherwise null.</returns>
		IContact Get(string id);
	}
}
